var app = getApp(), tcity = require("../../../we7/resource/js/util.js");

Page({
    data: {
        is_show_share: !1,
        _is_load: !0,
        is_akey: !1,
        card_info: []
    },
    onLoad: function(a) {
        console.log("携带value值为：", a);
        var t = this;
        app.util.footer(this);
        var e = a.cardid;
        app.util.request({
            url: "entry/wxapp/VideoSetup",
            data: {
                m: "bbyscm_card"
            },
            success: function(a) {
                t.setData({
                    videosetup: a.data.data
                });
            }
        }), app.util.request({
            url: "entry/wxapp/Setup",
            data: {
                m: "bbyscm_card"
            },
            success: function(a) {
                t.setData({
                    setup: a.data.data,
                    apikey: a.data.data.apikey
                });
            }
        }), app.util.request({
            url: "entry/wxapp/GetCardVideot",
            data: {
                m: "bbyscm_card",
                card_id: e
            },
            success: function(a) {
                a.data.data ? 0 == a.data.errno ? (t.setData({
                    card_info: a.data.data,
                    cardname: a.data.data.cardname,
                    glo_is_load: !1,
                    _is_load: !1
                }), wx.setNavigationBarTitle({
                    title: a.data.data.cardname + "的视频"
                }), 0 == a.data.data.fenxiang && wx.hideShareMenu()) : t.setData({
                    is_load_more: !1
                }) : t.setData({
                    is_akey: !0
                });
            }
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {
        var a = this;
        return {
            title: a.data.card_info.video_name,
            desc: a.data.card_info.video_name,
            path: "pages/card/video/video?cardid=" + a.data.card_info.id,
            success: function(a) {
                wx.showToast({
                    title: "转发成功",
                    icon: "success",
                    duration: 1e3,
                    mask: !0
                });
            },
            fail: function(a) {
                wx.showToast({
                    title: "转发失败",
                    icon: "error",
                    duration: 1e3,
                    mask: !0
                });
            }
        };
    }
});